package edu.spbsu.nonsm00th.qdiff.parser.exception;

import java.text.MessageFormat;

/**
 * Parent class for all parser exceptions.
 *
 * @author mbuzdov
 */
public class ParserException extends Exception {
    protected int position;

    protected ParserException(String message) {
        super(message);
    }

    public ParserException(int position) {
        super(MessageFormat.format("There is a parser exception : posotion {0}.", position));
        this.position = position;
    }

    public int getPosition() {
        return position;
    }
}
